package com.sali.design_pattern.d_strategy_pattern.lesson_03;

import com.sali.design_pattern.d_strategy_pattern.lesson_03.enums.StrategyOperatorEnum;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @description:
 * @date: 2024/1/6 11:14.
 * @version: 1.0
 */
@RestController
public class Lesson03Starter {

    @GetMapping("/test1")
    public void testStrategyCh3(String whichStrategy) {
        String paramA = "11111";
        com.sali.design_pattern.d_strategy_pattern.lesson_03.MyOperatorContext analysisOperatorContext = new com.sali.design_pattern.d_strategy_pattern.lesson_03.MyOperatorContext(StrategyOperatorEnum.getClazz(whichStrategy));
        analysisOperatorContext.executeStrategy(paramA);
    }
}
